import React,{PropTypes,Component} from 'react'
import dtipcss from './dtip.scss'

class Dtip extends Component{
    constructor(props, context){
        super(props, context);
        this.defaultLeft = '-11.25rem'
    }
    render(){
        return(
            <div className="dtip" onClick={this.props.onClick}>
                <i className="pi-icon pi-icon-help"></i>
                <div className="dtip-box" style={{display:this.props.visible?'block':'none',left:this.props.dstyle?this.props.dstyle:this.defaultLeft}}>
                    <div className="dtip-content">
                        <h4>{this.props.title?this.props.title:'提示标题'}</h4>
                        <p>{this.props.message?this.props.message:'提示消息'}</p>
                    </div>
                </div>
            </div>

        )
    }
}
Dtip.protoTypes = {

}

export default Dtip;
